import Vue from 'vue'
import Component from 'vue-class-component'
import './shareStyle.css'

@Component({
  props: {
    product: Object
  }
})
export default class ShareItemClass extends Vue {
  handlerJump() {
    this.$router.push({name: 'shareDetail'})
  }

  render () {
    return (
      <div class = 'shareItemClass' onClick={this.handlerJump}>
        <img src = 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1511244729703&di=ed1f96ae847b491b3dccedd9fed3a473&imgtype=0&src=http%3A%2F%2Fimg10.360buyimg.com%2Fn1%2Fs900x900_g12%2FM00%2F03%2F01%2FrBEQYVM0yEMIAAAAAAC0bZC4mzEAADa6wBbgJAAALSF210.jpg'/>
        <p>{this.product.brandName}</p>
        <p>{this.product.desc}</p>
        <h1>￥{this.product.price}</h1>
      </div>
    )
  }
}
